package com.ssm.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.io.Resource;

import java.io.IOException;


public class ResourceTest {

    public static void main(String[] args) throws IOException {
        ApplicationContext context = new AnnotationConfigApplicationContext(ResourceTest.class);
        Resource resource = context.getResource("classpath:k.txt");
        System.out.println(resource.contentLength());
    }
}
